package BC87_统计成绩;

import java.util.ArrayList;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        ArrayList<Double> list = new ArrayList<>();
        double sum = 0.0;
        while (sc.hasNext()){
            double v = sc.nextDouble();
            list.add(v);
            sum += v;
        }
        list.sort(Double::compareTo);

        System.out.printf("%.2f %.2f %.2f", list.get(n - 1), list.get(0), sum / n);
    }
}

